{literal}
<script>
function updateAcyEditor(v)
{
	if(v==1) {
		window.document.getElementById("textfieldset0").style.display = 'none';
		window.document.getElementById("textfieldset1").style.display = 'block';
	} else {
		window.document.getElementById("textfieldset1").style.display = 'none';
		window.document.getElementById("textfieldset0").style.display = 'block';
	}
}
</script>
<style>
form {
	margin: 0;
	padding: 0;
}
</style>
{/literal}
<!-- Content Area -->
<div class="dma-thumbnail">
    <div class="content">
            
        <div class="header">
            
            <h1 class="page-title">ADD NEWSLETTER</h1>
        </div>
        
        <ul class="breadcrumb">
            <li><a href="#">Home</a> <span class="divider">/</span></li>
            <li><a href="{$link_return}">Newsletter</a> <span class="divider">/</span></li>
            <li class="active">Create</li>
        </ul>        
		{if $msg}
        <div class="alert alert-success">
         <button class="close" data-dismiss="alert" type="button">×</button>
        {$msg}   
        </div>
        {/if}    
        <div class="container-fluid">
        	<form name="frmAdmin" action="{$action}" method="post">
            <div class="row-fluid">
                <div class="btn-toolbar">
                    <button class="btn btn-primary" type="button" onclick="javascript:document.frmAdmin.submit();"><i class="icon-save"></i> Save</button>
                    <a href="{$link_return}" data-toggle="modal" class="btn">Cancel</a>
                  <div class="btn-group">
                  </div>
                </div>
                <div class="well">
                    <label class="control-label">Subject</label>
                    <input type="text" name="subject" id="subject" value="{$subject}" />
                    <label>Published</label>
                    <label class="checkbox inline">
                        <input type="radio" id="publish1" name="publish" value="1"  {if $published}checked="checked"{/if} /> Yes
                    </label>
                    <label class="checkbox inline">
                        <input type="radio" id="publish0" name="publish" value="0" {if !$published}checked="checked"{/if}  /> No
                    </label>
                    <label class="control-label">From Name</label>
                    <input id="fromname" type="text" name="fromname" size="40" value="{$fromname}" />
                    <label class="control-label">Subject</label>
                    <input id="fromemail" type="text" name="fromemail" size="40" value="{$fromemail}" />
                    {if $groups}
                    <label class="control-label">List User Groups</label>
                    {foreach from=$groups item=arr_groups}
                    	<div>
                    	{foreach from=$arr_groups item=group}
                        	{if $group.id}
                            <label class="checkbox inline">
                                <input type="checkbox" value="{$group.id}" name="chkGroup[]" id="chkGroup{$group.idx}" {if $group.checked}checked{/if} /> {$group.name}
                            </label>
                            {/if}
                        {/foreach}
                        </div>
                    {/foreach}
                    {/if}                                
                                
                                                             
                    <label>Send HTML Version </label>
                    <label class="checkbox inline">
                        <input type="radio" name="htmls" id="html0" value="1" {if $html == 1} checked="checked" {/if} onclick="updateAcyEditor(1)" /> Yes
                    </label>
                    <label class="checkbox inline">
                        <input type="radio" name="htmls" id="html1" value="0" {if $html == 0} checked="checked" {/if} onclick="updateAcyEditor(0)" /> No
                    </label> 
				
                    <fieldset class="adminform" width="100%" id="textfieldset0" {if $html == 0} style="display:none" {/if}>
                      <legend>Text Version</legend>
                      <textarea style="width:98%" rows="20" name="altbody" id="altbody" >{$altbody}</textarea>
                    </fieldset>
                    <fieldset class="adminform" width="100%" id="textfieldset1" {if $html == 1} style="display:none" {/if}>
                      <legend>HTML Version</legend>
                      {ckeditor name=body id=body value=$body height=400 width=800 toolbar=Default}
                       <div style="color:#666; font-style:italic;">Link to track: {$php5WebPath}/track.php?type=1&redirect=[path] </div>
                    </fieldset>                    
                </div>
                                                       
            </div>
            <input type="hidden" value="{$grouptotal}" name="grouptotal" />
              <input type="hidden" id="tempid" name="tempid" value="0" />
              <input type="hidden" id="html" name="html" value="0" />
              <input type="hidden" name="type" value="news" />            
            </form>
        </div>
    </div>
</div>

  <!-- end of element-box -->
  
  <noscript>
  Warning! JavaScript must be enabled for proper operation of the Administrator backend.
  </noscript>
  <div class="clr"></div>
</div>
<!-- end of content -->